<me:UIABKOPF x:Class="WPFExcelReport.TAB02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    Loaded="Window_Loaded"
                     x:Name="TV"                   
     >
    <me:UIABKOPF.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIABKOPF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="1*" />
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <Grid Margin="10,0,0,0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" Text="{Binding Source={Localization:Translate Word=生产单}}" ></TextBlock>
                <TextBlock Grid.Column="1"  FontSize="18" Foreground="Red"  
                      Text="{Binding ABKAUFKRS,Source={StaticResource vwMaster}}" Width="30"/>
                <TextBlock Grid.Column="2" >-</TextBlock>
                <TextBlock  Grid.Column="3"  FontSize="18" Foreground="Red"   
                         Text="{Binding ABKAUFLFD,Source={StaticResource vwMaster},Converter={StaticResource pnum}}" Width="60"/>
            </Grid>
        </WrapPanel>
        <DataGrid  Grid.Row="1" Grid.Column="0"
                        FontSize="16" 
                         AutoGenerateColumns="False" 
                        EnableRowVirtualization="True" 
                        ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                        HeadersVisibility="Column" 
                   CanUserReorderColumns="True" 
                   CanUserResizeRows="True" 
                   CanUserSortColumns="True" 
                   IsReadOnly="True"
                       RowDetailsVisibilityMode="VisibleWhenSelected" Width="Auto"  EnableColumnVirtualization="True" 
                        HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ABPAUFKRS}"    Width="30" />
                <DataGridTextColumn Binding="{Binding Path=ABPAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=生产单}}"  Width="60" />
                <DataGridTextColumn Binding="{Binding Path=ABPAUFPOS}"   Width="40" />
                <DataGridTextColumn Binding="{Binding Path=ABPSOLLMENGE5, Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:TranslateExtension Word=KG}}"  Width="60" />
                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:TranslateExtension Word=品种}}"  Width="120" />
                <DataGridTextColumn Binding="{Binding Path=ABPVAR}" Header="{Binding Source={Localization:TranslateExtension Word=变量}}"  Width="30"></DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="90"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</me:UIABKOPF> 
